News for hackers. Stuff that matters.
Re:Haskell RecordDotSyntax language extension proposal (Acce... by srtjstjsj on Monday September 21, 2020 @09:28AM (#24543111)
But you've got the module there to disambiguate the ., which you don't have in records.
Re:Haskell RecordDotSyntax language extension proposal (Acce... by runeks on Monday September 21, 2020 @12:12PM (#24545086)
I don't think this is true. The presence of a qualified import of "Data.Set as Set" does not change how the following is parsed.

    import Data.Set (fromList)
    import qualified Data.Set as Set


    data Set a = Set (Set.Set a)

    f :: Ord a => [a] -> Set a
    f = Set . fromList

    g :: Ord a => [a] -> Set a
    g = Set .fromList

    h :: Ord a => [a] -> Set a
    h = Set. fromList

    i :: Ord a => [a] -> Set.Set a
    i = Set.fromList
In other words, the . is interpreted as a "module dot" if and only if there is no whitespace either preceding or following the dot.