# Pastebin SJhDUCgy {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} enumIndices :: forall a. (Enum a, Bounded a) => [Int] enumIndices = [fromEnum @a minBound..fromEnum @a maxBound]