Remove an unsafe use of head (#7118)
Remove an unsafe use of head (#7118)

lukexi/ghc-7.8-arm64,mfine/ghc,green-haskell/ghc,ghc-android/ghc,AlexanderPankiv/ghc,TomMD/ghc,ekmett/ghc,tibbe/ghc,holzensp/ghc,nomeata/ghc,nkaretnikov/ghc,TomMD/ghc,tibbe/ghc,gcampax/ghc,christiaanb/ghc,ryantm/ghc,siddhanathan/ghc,christiaanb/ghc,mfine/ghc,fmthoma/ghc,nathyong/microghc-ghc,GaloisInc/halvm-ghc,da-x/ghc,acowley/ghc,wxwxwwxxx/ghc,vTurbine/ghc,frantisekfarka/ghc-dsi,siddhanathan/ghc,vTurbine/ghc,mettekou/ghc,gcampax/ghc,sdiehl/ghc,jstolarek/ghc,forked-upstream-packages-for-ghcjs/ghc,fmthoma/ghc,gridaphobe/ghc,nkaretnikov/ghc,forked-upstream-packages-for-ghcjs/ghc,ghc-android/ghc,ml9951/ghc,urbanslug/ghc,bitemyapp/ghc,urbanslug/ghc,mcschroeder/ghc,GaloisInc/halvm-ghc,TomMD/ghc,olsner/ghc,jstolarek/ghc,nathyong/microghc-ghc,lukexi/ghc-7.8-arm64,mfine/ghc,tjakway/ghcjvm,oldmanmike/ghc,da-x/ghc,nathyong/microghc-ghc,tjakway/ghcjvm,hferreiro/replay,gcampax/ghc,mfine/ghc,sgillespie/ghc,AlexanderPankiv/ghc,ezyang/ghc,nathyong/microghc-ghc,nushio3/ghc,gridaphobe/ghc,elieux/ghc,nathyong/microghc-ghc,shlevy/ghc,jstolarek/ghc,oldmanmike/ghc,oldmanmike/ghc,mettekou/ghc,elieux/ghc,frantisekfarka/ghc-dsi,tjakway/ghcjvm,anton-dessiatov/ghc,nkaretnikov/ghc,sdiehl/ghc,sdiehl/ghc,acowley/ghc,urbanslug/ghc,wxwxwwxxx/ghc,lukexi/ghc-7.8-arm64,oldmanmike/ghc,AlexanderPankiv/ghc,urbanslug/ghc,ezyang/ghc,hferreiro/replay,christiaanb/ghc,forked-upstream-packages-for-ghcjs/ghc,sgillespie/ghc,ryantm/ghc,gcampax/ghc,green-haskell/ghc,tibbe/ghc,mcschroeder/ghc,mfine/ghc,ml9951/ghc,gcampax/ghc,nomeata/ghc,mcschroeder/ghc,spacekitteh/smcghc,siddhanathan/ghc,wxwxwwxxx/ghc,gridaphobe/ghc,vikraman/ghc,snoyberg/ghc,olsner/ghc,GaloisInc/halvm-ghc,acowley/ghc,christiaanb/ghc,mcschroeder/ghc,snoyberg/ghc,bitemyapp/ghc,mettekou/ghc,jstolarek/ghc,gridaphobe/ghc,ml9951/ghc,ml9951/ghc,ekmett/ghc,nomeata/ghc,nomeata/ghc,hferreiro/replay,fmthoma/ghc,urbanslug/ghc,vTurbine/ghc,spacekitteh/smcghc,forked-upstream-packages-for-ghcjs/ghc,lukexi/ghc-7.8-arm64,shlevy/ghc,da-x/ghc,spacekitteh/smcghc,hferreiro/replay,mettekou/ghc,urbanslug/ghc,green-haskell/ghc,nushio3/ghc,gridaphobe/ghc,ghc-android/ghc,TomMD/ghc,GaloisInc/halvm-ghc,sgillespie/ghc,acowley/ghc,elieux/ghc,fmthoma/ghc,acowley/ghc,shlevy/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,TomMD/ghc,mcschroeder/ghc,siddhanathan/ghc,olsner/ghc,ryantm/ghc,shlevy/ghc,oldmanmike/ghc,frantisekfarka/ghc-dsi,ezyang/ghc,ml9951/ghc,wxwxwwxxx/ghc,sgillespie/ghc,hferreiro/replay,elieux/ghc,anton-dessiatov/ghc,snoyberg/ghc,tjakway/ghcjvm,oldmanmike/ghc,lukexi/ghc,TomMD/ghc,lukexi/ghc,wxwxwwxxx/ghc,acowley/ghc,ezyang/ghc,bitemyapp/ghc,vikraman/ghc,bitemyapp/ghc,nkaretnikov/ghc,wxwxwwxxx/ghc,lukexi/ghc-7.8-arm64,snoyberg/ghc,vikraman/ghc,mettekou/ghc,fmthoma/ghc,vikraman/ghc,siddhanathan/ghc,AlexanderPankiv/ghc,christiaanb/ghc,snoyberg/ghc,sgillespie/ghc,siddhanathan/ghc,elieux/ghc,fmthoma/ghc,frantisekfarka/ghc-dsi,sgillespie/ghc,tibbe/ghc,vTurbine/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,jstolarek/ghc,tjakway/ghcjvm,nomeata/ghc,bitemyapp/ghc,nushio3/ghc,nkaretnikov/ghc,mfine/ghc,GaloisInc/halvm-ghc,sdiehl/ghc,gcampax/ghc,forked-upstream-packages-for-ghcjs/ghc,oldmanmike/ghc,snoyberg/ghc,ml9951/ghc,da-x/ghc,gcampax/ghc,urbanslug/ghc,AlexanderPankiv/ghc,vTurbine/ghc,frantisekfarka/ghc-dsi,gridaphobe/ghc,lukexi/ghc,nathyong/microghc-ghc,ekmett/ghc,ghc-android/ghc,mcschroeder/ghc,spacekitteh/smcghc,anton-dessiatov/ghc,ghc-android/ghc,sdiehl/ghc,ekmett/ghc,lukexi/ghc,tjakway/ghcjvm,AlexanderPankiv/ghc,sdiehl/ghc,olsner/ghc,vikraman/ghc,sgillespie/ghc,ghc-android/ghc,nushio3/ghc,mfine/ghc,mcschroeder/ghc,ryantm/ghc,anton-dessiatov/ghc,nushio3/ghc,shlevy/ghc,green-haskell/ghc,da-x/ghc,anton-dessiatov/ghc,vTurbine/ghc,da-x/ghc,vikraman/ghc,fmthoma/ghc,da-x/ghc,nathyong/microghc-ghc,olsner/ghc,AlexanderPankiv/ghc,holzensp/ghc,tibbe/ghc,GaloisInc/halvm-ghc,vikraman/ghc,nushio3/ghc,green-haskell/ghc,ml9951/ghc,lukexi/ghc,ezyang/ghc,nkaretnikov/ghc,holzensp/ghc,ezyang/ghc,mettekou/ghc,sdiehl/ghc,hferreiro/replay,nushio3/ghc,anton-dessiatov/ghc,ml9951/ghc,wxwxwwxxx/ghc,christiaanb/ghc,TomMD/ghc,elieux/ghc,forked-upstream-packages-for-ghcjs/ghc,hferreiro/replay,ghc-android/ghc,elieux/ghc,acowley/ghc,holzensp/ghc,ekmett/ghc,shlevy/ghc,spacekitteh/smcghc,mettekou/ghc,ryantm/ghc,shlevy/ghc,holzensp/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,christiaanb/ghc,ezyang/ghc,olsner/ghc,nkaretnikov/ghc,snoyberg/ghc,siddhanathan/ghc,gridaphobe/ghc