Skip to content

Instantly share code, notes, and snippets.

@pchiusano
Created October 29, 2015 17:58
Show Gist options
  • Save pchiusano/d989a55669ccdc1478ae to your computer and use it in GitHub Desktop.
Save pchiusano/d989a55669ccdc1478ae to your computer and use it in GitHub Desktop.
GHC holes have useless types

Got this recently:

Found hole ‘_view’ with type: t2 -> t3 -> t1
Where: ‘t1’ is a rigid type variable bound by
            the inferred type of view :: t2 -> t3 -> t1
            at src/Unison/Explorer.hs:38:11
       ‘t2’ is a rigid type variable bound by
            the inferred type of view :: t2 -> t3 -> t1
            at src/Unison/Explorer.hs:38:11
       ‘t3’ is a rigid type variable bound by
            the inferred type of view :: t2 -> t3 -> t1
            at src/Unison/Explorer.hs:38:11
Relevant bindings include
  sel :: t3 (bound at src/Unison/Explorer.hs:38:21)
  list :: t2 (bound at src/Unison/Explorer.hs:38:16)
  view :: t2 -> t3 -> t1 (bound at src/Unison/Explorer.hs:38:11)
  selection :: Dynamic t Int (bound at src/Unison/Explorer.hs:35:7)
  responses :: Dynamic t s (bound at src/Unison/Explorer.hs:34:7)
  actions :: Event t (Action (m s) (k, m a))

Pretty useless, and pretty typical for this feature. The actual type of view is [(k, m a)] -> Int -> b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment